package com.gt.web.srv.service;

import com.github.pagehelper.PageInfo;
import com.gt.web.api.common.R;
import com.gt.web.srv.domain.RepairApplication;
import com.gt.web.srv.web.api.command.RepairApplicationCommand;
import com.gt.web.srv.web.api.resource.ss.RepairApplicationResource;

public interface RepairApplicationService {

	/**
	 *  新增
	 * @return
	 */
	R insert(RepairApplicationCommand repairApplication);

	/**
	 * 根据ID查询维修申请
	 * @param repairId 维修ID
	 */
	R<RepairApplicationResource>  selectById(Long repairId);

	/**
	 *  新增
	 * @return
	 */
	R updateById(RepairApplicationCommand repairApplication);

	/**
	 * 更新状态和物流信息
	 * @param repairId 维修ID
	 * @param trackingNumber 快递单号
	 * @param updateBy 更新人
	 * @return 影响行数
	 */
	R updateStatusAndTracking(Long repairId,
								String trackingNumber, String updateBy);

	/**
	 * 分页查询
	 * @return
	 */
	R<PageInfo<RepairApplicationResource>> page(RepairApplicationCommand repairApplication);

}
